package com.hyzh.latte.vehicle.dmo;

import com.coffee.core.ResponseCode;
import com.hyzh.latte.util.LatteResponseCode;
import lombok.*;

import java.util.List;

/**
 * @author songkui
 * @since 2024/5/13 14:43
 */

@Setter
@Getter
@NoArgsConstructor
public class StreamResponse {
    private Integer code;
    private String msg;
    private List<StreamDataResponse> data;

    public StreamResponse(Integer code, String msg){
        this.code = code;
        this.msg = msg;
    }

    public static StreamResponse ofLatteResponseCode(ResponseCode responseCode){
        return new StreamResponse(responseCode.code(), responseCode.message());
    }
    public static StreamResponse ofLatteResponseCode(ResponseCode responseCode, String msg){
        return new StreamResponse(responseCode.code(), responseCode.message());
    }

}
